package com.tiger.cloud.model.crm;

import java.io.UnsupportedEncodingException;
import java.sql.Timestamp;
import java.util.List;

import com.tiger.cloud.security.EncodeUtil;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.builder.ToStringBuilder;

import com.tiger.cloud.common.mybatis.TigerBaseEntity;
import com.tiger.cloud.enums.DeleteEnum;
import com.tiger.cloud.enums.UserGender;
import com.tiger.cloud.enums.UserInfoJobType;
import com.tiger.cloud.enums.UserInfoMarriageType;
import com.tiger.cloud.enums.UserInfoPosition;
import com.tiger.cloud.enums.UserInfoWorkPeriod;

import io.swagger.annotations.ApiModelProperty;

/**
 * 
 * crm_user_info-用户信息
 *
 */
public class UserInfo extends TigerBaseEntity {

	private static final long serialVersionUID = 1L;

	/**
	 * 所属用户
	 */
	@ApiModelProperty(value = "所属用户")
	private Long userId;
	/**
	 * 积分
	 */
	@ApiModelProperty(value = "积分")
	private Integer integral;
	/**
	 * 
	 */
	@ApiModelProperty(value = "账号")
	private String loginId;
	/**
	 * 
	 */
	@ApiModelProperty(value = "")
	private String nickName;
	/**
	 * 
	 */
	@ApiModelProperty(value = "个人名片")
	private String businessCard;
	/**
	 * 姓名
	 */
	@ApiModelProperty(value = "姓名")
	private String userName;
	/**
	 * 
	 */
	@ApiModelProperty(value = "")
	private String mobile;
	/**
	 * 微信
	 */
	@ApiModelProperty(value = "微信")
	private String weiXin;
	/**
	 * 头像
	 */
	@ApiModelProperty(value = "头像")
	private String headImage;
	/**
	 * 年龄
	 */
	@ApiModelProperty(value = "年龄")
	private String age;
	/**
	 * 是否删除, 0:正常,1:删除
	 */
	@ApiModelProperty(value = "是否删除, 0:正常,1:删除")
	private DeleteEnum isDelete;
	/**
	 * 
	 */
	@ApiModelProperty(value = "")
	private String districtName;
	/**
	 * 所属区域 区ID
	 */
	@ApiModelProperty(value = "所属区域  区ID")
	private Long districtId;
	/**
	 * 
	 */
	@ApiModelProperty(value = "")
	private String cityName;
	/**
	 * 所属区域 城市ID
	 */
	@ApiModelProperty(value = "所属区域  城市ID")
	private Long cityId;
	/**
	 * 
	 */
	@ApiModelProperty(value = "")
	private String provinceName;
	/**
	 * 所属区域 省ID
	 */
	@ApiModelProperty(value = "所属区域  省ID")
	private Long provinceId;
	/**
	 * 住址--区名称
	 */
	@ApiModelProperty(value = "住址--区名称")
	private String addressDistrictName;
	/**
	 * 住址--区ID
	 */
	@ApiModelProperty(value = "住址--区ID")
	private Long addressDistrictId;
	/**
	 * 住址--市名称
	 */
	@ApiModelProperty(value = "住址--市名称")
	private String addressCityName;
	/**
	 * 住址--市ID
	 */
	@ApiModelProperty(value = "住址--市ID")
	private Long addressCityId;
	/**
	 * 住址--省名称
	 */
	@ApiModelProperty(value = "住址--省名称")
	private String addressProvinceName;
	/**
	 * 住址-->省ID
	 */
	@ApiModelProperty(value = "住址-->省ID")
	private Long addressProvinceId;
	/**
	 * 性别 0:男，1:女
	 */
	@ApiModelProperty(value = "性别   0:男，1:女")
	private UserGender gender;
	/**
	 * 婚姻状况 0:未婚、1:已婚
	 */
	@ApiModelProperty(value = "婚姻状况 0:未婚、1:已婚,2:其它",example="35")
    private UserInfoMarriageType marriage;
	/**
	 * 
	 */
	@ApiModelProperty(value = "")
	private Timestamp createTime;
	/**
	 * 职位(多选)   0:业务、1:风控、2:催收、3:办公文员
	 */
	@ApiModelProperty(value = "职位(多选)   0:业务、1:风控、2:催收、3:办公文员",example="0")
    private UserInfoPosition position;
    /**
	 * 职务  0:老板, 1:小股东，2:主管, 3:职员
	 */
	@ApiModelProperty(value = "职务  0:老板, 1:小股东，2:主管, 3:职员",example="0")
    private UserInfoJobType job;
	/**
	 * 从业年限（同行）  0: <1、1:1~2、2:2~5、3:>5
	 */
	@ApiModelProperty(value = "从业年限（同行）  0: <1、1:1~2、2:2~5、3:>5",example="0")
    private UserInfoWorkPeriod workPeriod;
	/**
	 * 个人备注
	 */
	@ApiModelProperty(value = "个人备注")
	private String privateInfo;
	/**
	 * 个人图片
	 */
	@ApiModelProperty(value = "个人图片")
	private String privateAttachment;
	/**
	 * 
	 */
	private Timestamp lastUpdateTime;

	/**
	 * 用户企业信息
	 */
	@ApiModelProperty(value = "用户企业信息",hidden=true)
	private List<UserCompanyInfo> companyInfos;
	
	
	public UserInfo() {

	}
	
	public List<UserCompanyInfo> getCompanyInfos() {
		return companyInfos;
	}

	public void setCompanyInfos(List<UserCompanyInfo> companyInfos) {
		this.companyInfos = companyInfos;
	}

	public String getBusinessCard() {
		return businessCard;
	}

	public void setBusinessCard(String businessCard) {
		this.businessCard = businessCard;
	}

	public String getLoginId() {
		return loginId;
	}

	public void setLoginId(String loginId) {
		this.loginId = loginId;
	}

	public UserInfoMarriageType getMarriage() {
		return marriage;
	}

	public void setMarriage(UserInfoMarriageType marriage) {
		this.marriage = marriage;
	}

	public UserInfoPosition getPosition() {
		return position;
	}

	public void setPosition(UserInfoPosition position) {
		this.position = position;
	}

	public UserInfoJobType getJob() {
		return job;
	}

	public void setJob(UserInfoJobType job) {
		this.job = job;
	}

	public UserInfoWorkPeriod getWorkPeriod() {
		return workPeriod;
	}

	public void setWorkPeriod(UserInfoWorkPeriod workPeriod) {
		this.workPeriod = workPeriod;
	}

	public static long getSerialversionuid() {
		return serialVersionUID;
	}

	public Long getUserId() {
		return this.userId;
	}

	public void setUserId(Long userId) {
		this.userId = userId;
	}

	public Integer getIntegral() {
		return this.integral;
	}

	public void setIntegral(Integer integral) {
		this.integral = integral;
	}

	public String getNickName() {
		return this.nickName;
	}

	public void setNickName(String nickName) {
		this.nickName = nickName;
	}

	public String getUserName() {
		return this.userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	public String getMobile() {
		return this.mobile;
	}

	public void setMobile(String mobile) {
		this.mobile = mobile;
	}

	public String getWeiXin() {
		return this.weiXin;
	}

	public void setWeiXin(String weiXin) {
		this.weiXin = weiXin;
	}

	public String getHeadImage() {
		return this.headImage;
	}

	public void setHeadImage(String headImage) {
		this.headImage = headImage;
	}

	public String getAge() {
		return this.age;
	}

	public void setAge(String age) {
		this.age = age;
	}

	public DeleteEnum getIsDelete() {
		return this.isDelete;
	}

	public void setIsDelete(DeleteEnum isDelete) {
		this.isDelete = isDelete;
	}

	public String getDistrictName() {
		return this.districtName;
	}

	public void setDistrictName(String districtName) {
		this.districtName = districtName;
	}

	public Long getDistrictId() {
		return this.districtId;
	}

	public void setDistrictId(Long districtId) {
		this.districtId = districtId;
	}

	public String getCityName() {
		return this.cityName;
	}

	public void setCityName(String cityName) {
		this.cityName = cityName;
	}

	public Long getCityId() {
		return this.cityId;
	}

	public void setCityId(Long cityId) {
		this.cityId = cityId;
	}

	public String getProvinceName() {
		return this.provinceName;
	}

	public void setProvinceName(String provinceName) {
		this.provinceName = provinceName;
	}

	public Long getProvinceId() {
		return this.provinceId;
	}

	public void setProvinceId(Long provinceId) {
		this.provinceId = provinceId;
	}

	public String getAddressDistrictName() {
		return this.addressDistrictName;
	}

	public void setAddressDistrictName(String addressDistrictName) {
		this.addressDistrictName = addressDistrictName;
	}

	public Long getAddressDistrictId() {
		return this.addressDistrictId;
	}

	public void setAddressDistrictId(Long addressDistrictId) {
		this.addressDistrictId = addressDistrictId;
	}

	public String getAddressCityName() {
		return this.addressCityName;
	}

	public void setAddressCityName(String addressCityName) {
		this.addressCityName = addressCityName;
	}

	public Long getAddressCityId() {
		return this.addressCityId;
	}

	public void setAddressCityId(Long addressCityId) {
		this.addressCityId = addressCityId;
	}

	public String getAddressProvinceName() {
		return this.addressProvinceName;
	}

	public void setAddressProvinceName(String addressProvinceName) {
		this.addressProvinceName = addressProvinceName;
	}

	public Long getAddressProvinceId() {
		return this.addressProvinceId;
	}

	public void setAddressProvinceId(Long addressProvinceId) {
		this.addressProvinceId = addressProvinceId;
	}

	public UserGender getGender() {
		return this.gender;
	}

	public void setGender(UserGender gender) {
		this.gender = gender;
	}

	public Timestamp getCreateTime() {
		return this.createTime;
	}

	public void setCreateTime(Timestamp createTime) {
		this.createTime = createTime;
	}
	public String getPrivateInfo_() {
		if(null == privateInfo){
			return null;
		}
		try {

			return EncodeUtil.urlEncode(privateInfo);
		} catch (UnsupportedEncodingException e) {
			e.printStackTrace();
		};
		return null;
	}

	public void setPrivateInfo_(String privateInfo_) {
		if(null == privateInfo_){
			return;
		}
		try {
			this.privateInfo= EncodeUtil.urlDecode(privateInfo_);
		} catch (UnsupportedEncodingException e) {
			e.printStackTrace();
		};
	}

	public String getPrivateInfo() {
		if(null == privateInfo ){
			return null;
		}
		try {
			return EncodeUtil.urlDecode(privateInfo);
		} catch (UnsupportedEncodingException e) {
			e.printStackTrace();
		};
		return null;
	}

	public void setPrivateInfo(String privateInfo) {
		this.privateInfo = privateInfo;
	}

	public String getPrivateAttachment() {
		return this.privateAttachment;
	}

	public void setPrivateAttachment(String privateAttachment) {
		this.privateAttachment = privateAttachment;
	}

	public Timestamp getLastUpdateTime() {
		return this.lastUpdateTime;
	}

	public void setLastUpdateTime(Timestamp lastUpdateTime) {
		this.lastUpdateTime = lastUpdateTime;
	}

	@Override
	public String toString() {
		return ToStringBuilder.reflectionToString(this);
	}

}